﻿using System;
using SimpleServiceBus.Bus;
using SimpleServiceBus.Bus.MessageManagement.MessageHandling;
using SimpleServiceBus.Bus.Pipeline;

namespace SimpleServiceBus.EndpointManagement.Server.MessageHandlers
{
    public abstract class MonitorServiceMessageHandler<T> : IMessageHandler<T>
    {
        public abstract void Handle(T message, IMessageContext context);

        public IEndpointMonitorServerService GetEndpointMonitorService(IMessageContext context)
        {
            return context.GetLocalService<IEndpointMonitorServerService>();
        }
    }
}